package Exercise4.exercise4;
import java.util.*;
class PerLine{
	public static void printChars(char ch1,char ch2,int numberPerLine) {
		int c=ch1,ch=ch2,count=0;
		for(int i=c;i<=ch;i++) {
			//String s=Integer.toString(i);
			//String s=String.valueOf(i);
			System.out.print((char)i+" ");
			count++;
			if(count%numberPerLine==0) {
				System.out.println();
			}
		}
	}
}
public class Test3 {
	public static void main(String[] args) {
		char ch1,ch2;
		int numberPerLine;
		Scanner in=new Scanner(System.in);
		System.out.println("请输入第一个字符、最后一个字符以及行输出量：");
		ch1=in.next().charAt(0);
		ch2=in.next().charAt(0);
		numberPerLine=in.nextInt();
		new PerLine().printChars(ch1, ch2, numberPerLine);
	}
}
